
public class Number extends AbstractElement {

	
	
	
	public Number(String value) {
		this.value = value;
		this.type = "Number";
	}	
	
	public Number() {
		this.type = "Number";
	}
	
	public Object interpret(RobotActions robot) {
		
		try {
			return new Integer(Integer.parseInt(this.value));
		}
		
		catch (NumberFormatException e) {
			System.err.println("Number.interpret: Error with parserInt");
			return null;
		}
		catch (Exception e){
			System.err.println("Number.interpret: An error ocurred processing Number");
			return null;
		}

	}
}
